<%-- 
    Document   : udetail
    Created on : Oct 28, 2009, 3:26:25 PM
    Author     : Phong
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="java.util.*,DAOClass.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                <link rel="stylesheet" href="../css/style.css" />
		<link rel="stylesheet" href="../css/front.css"  />
        <link rel="stylesheet" href="../css/backend.css" />
        <title>JSP Page</title>
    </head>
    <body>
        <jsp:useBean id="getMemByName" class="DAOClass.Members" >

        </jsp:useBean>
        <%
            ArrayList<InfoMember> arrMem = new ArrayList<InfoMember>();

            String userName = "";


            userName = request.getParameter("u");
            if (userName != "") {
                arrMem = getMemByName.getMembersByName(userName);
                if (arrMem.size() > 0) {
                    for (int i = 0; i < arrMem.size(); i++) {

                        String strNameGroup = "";
                        String strStatus = "";
                        String strSex = "";



                        String strUser = arrMem.get(i).getUserName();
                        int intIDG = arrMem.get(i).getGroup();
                        String strName = arrMem.get(i).getFullName();
                        int intSex = arrMem.get(i).getSex();
                        String strTel = arrMem.get(i).getPhone();
                        String strBirthDay = arrMem.get(i).getBirthDay();
                        String strAdd = arrMem.get(i).getAddress();
                        String strMail = arrMem.get(i).getEmail();
                        int intStatus = arrMem.get(i).getStatus();

                        if (intIDG == 1) {
                            strNameGroup = "Quản trị viên";
                        } else {
                            strNameGroup = "Thành viên";
                        }
                        if (intStatus == 1) {
                            strStatus = "Đang hoạt động";
                        } else {
                            strStatus = "Ngưng hoạt động";
                        }
                        if (intSex == 1) {
                            strSex = "Nam";
                        } else {
                            strSex = "Nữ";
                        }
        %>
        <table width="100%" style="border:1px solid dotted">
                        <tr>
                            <td colspan="2" align="center"><h3>Information Member</h3></td>

            </tr>
            <tr>
                <td width="104">UserName : </td>
                <td width="342"><b><%=strUser%></b></td>
            </tr>
            <tr>
                <td>FullName : </td>
                <td><%=strNameGroup%></td>
            </tr>
            <tr>
                <td>Sex : </td>
                <td><%=strSex%></td>
            </tr>
            <tr>
                <td>Address : </td>
                <td><%=strAdd%></td>
            </tr>
            <tr>
                <td>Telephone : </td>
                <td><%=strTel%></td>
            </tr>
            <tr>
                <td>Email : </td>
                <td><a href="mailto:<%=strMail%>" ><%=strMail%></a></td>
            </tr>
            <tr>
                <td>Birthday : </td>
                <td><%=strBirthDay%></td>
            </tr>
            <tr>
                <td>Status :</td>
                <td><%=strStatus%></td>
            </tr>
            <tr>
                <td>Group : </td>
                <td><%=strNameGroup%></td>
            </tr>

            <tr>
                <td colspan="2" align="center">
                    <a href="javascript:memberDetail = window.close()" >
                        Đóng lại
                    </a>
                </td>

            </tr>
        </table>

        <%                }
                }
            }
        %>
    </body>
</html>
